﻿CREATE PROCEDURE [dbo].[proc_Finance_Subject_Delete]
	(
		@SId uniqueidentifier,
		@Id int
	)
AS
begin
	declare @childCount int
	Select @childCount=Count(Id) From Finance_Subject Where ParentId=@Id
	if(@childCount=0)
	Delete From Finance_Subject Where SId=@SId
end
	RETURN
